package com.levy.contronller.javaWeb.threadConcurrence.gmcc.bi;

/**
 * Created by 郭利伟 on 2017.10.31.
 */
public class AppPressTest {

    /**
     * 多线程并发测试     跑一次即可 否则会内存溢出  需要加个参数pro，可以是任何值
     * @param request
     * @param response
     * @return
     * @throws Exception
     */
//    @RequestMapping(value = "/Test")
//    @ResponseBody
//    public  Map<String, Object> Test(HttpServletRequest request,HttpServletResponse response) throws Exception{
//        Map<String, Object> map = new HashMap<String, Object>();
//        if (StringUtils.isBlank(request.getParameter("pro"))) {
//            map.put("data", "参数不全");
//            return map;
//        }
//
//        // 总访问量和并发量两重循环，依次增大访问
//        List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
//        for (int j = 500; j < 600; j += 100) {
//            for (int i = 10; i < 100; i += 10) {
//                // 要测试的URL
//                String url = "http://10.253.43.7:8080/app/page/appIndex/index.html";
//                Map<String, Object> map1 = new MultiThreadProxyHubApiTest(i, j, url, "").run();
//                list.add(map1);
//            }
//        }
//        System.out.println("finished!");
//        map.put("data", list);
//        return map;
//    }
}
